<?php
$result	=	array(); 
if($data)
{
	$result	=	json_decode($data->result);	
	//print_r($result);
}
?>
<div class="content">
	<div class="box-sc">
		<div class="sc-first">
			<p><strong>0</strong></p>
			<p><strong>1</strong></p>
			<p><strong>2</strong></p>
			<p><strong>3</strong></p>
			<p><strong>4</strong></p>
			<p><strong>5</strong></p>
			<p><strong>6</strong></p>
			<p><strong>7</strong></p>
			<p><strong>8</strong></p>
			<p><strong>9</strong></p>
		</div>
		<div class="sc-content">
			<?php for($i = 0; $i <= 9; $i++):?>
				<p <?php echo($i==9 ? 'class="last"' : "");?>>
				<?php for($j = 0; $j <= 9; $j++):?>
					<?php $suc = false;$link ='';?>
					<?php if($result):?>
					<?php foreach($result as $k => $v):?>
						<?php if($k == $i.$j):?>
							<?php 
								$suc = true;
								$link = detect_link($location->alias).''.$i.$j.'/'.$v[0].'-'.$v[1].'/';
								break;
							?>
						<?php endif;?>
					<?php endforeach;?>
					<?php endif;?>
					
					<?php if($suc == true):?>
						<strong><a href="<?php echo $link;?>"><?php echo $i.$j;?></a></strong>
					<?php else:?>
						<strong>&nbsp;&nbsp;&nbsp;&nbsp;</strong>
					<?php endif;?>
				<?php endfor;?>
				</p>
			<?php endfor;?>
		</div>
	</div>
	<div class="bot-mobile clearfix">
		<div class="share">Chia sẻ cầu lên</div>
			<?php $this->load->view('client/layout/shared');?>
	</div>
</div>